from celery_tasks.main import celery_app
from libs.yuntongxun.sms import CCP
@celery_app.task
def ccp_send_sms_code(mobile, sms_code): #定义任务
    send_result = CCP().send_template_sms(mobile, [sms_code, 5], 1)
    print('当前验证码是：',sms_code)
    return send_result #云通讯发送成功send_result为0, 发送失败send_result为-1